package fr.polichouz.geotracer.shared;

import fr.polichouz.geotracer.shared.SimpleLocation;

/**
 * Services of the Geotracer service.
 * 
 * @author Yoyo
 */
public interface GeotracerService {

    /**
     * Create a new account.
     * 
     * @param username
     * @param password
     * 
     * @throws AlreadyTakeException is throw when the username is already take.
     * @throws IllegalArgumentException is throw if user/pass is invalid
     */
    void createAccount(String username, String password) 
    throws AlreadyTakeException, IllegalArgumentException;
    
    /**
     * Update a location.
     * 
     * @param location
     * @param username
     * @param password
     * 
     * @throws IllegalArgumentException is throw if user/pass is invalid
     */
    void updateLocation(SimpleLocation location, String username, 
	    String password);
    
    /**
     * Get the location of a user.
     * 
     * @param username
     * @param password
     * 
     * @throws IllegalArgumentException is throw if user/pass is invalid
     * 
     * @return
     */
    SimpleLocation getLocation(String username, String password);
}
